package com.ecut.property_project.mapper.character;

import com.ecut.property_project.model.character.Role;
import com.ecut.property_project.model.character.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    //selectAll与findAllUser功能相同
    List<User> selectAll();
    List<User> selectByPage(Integer page, Integer pageSize);
    List<User> findAllUser();
    User findUserById(Integer id);
    User findUserByTel(String tel);
    User findUserByWechat(String wechatId);
    Boolean insertUser(User user);
    List<Role> getUserRolesById(Integer id);
    Boolean updateUser(User user);

    Boolean updateUserImage(String imageUrl, int id);

    Boolean updateUserWx(String WeChatId, int id);

    Boolean updateUserEmail(String email, int id);
    Boolean updateUserTel(String tel, int id);

    Boolean deleteUser(Integer id);
    Boolean saveList(List<User> list);

}
